

	p=200;I=1.2;pai=3.141592653;L=200;h=300;
    E=zeros(161,161);
    U=zeros(161,161);
    PU=zeros(161);
    PE=zeros(161);
   for i=0:30:180 


    for x=-800:10:800
        for y=-800:10:800
            m=(x+810)/10;
            n=(y+810)/10;
           s=-1*x*I*p/(2*pai)*power(power((x+L/2*cos(i/180.0*pai)),2.0)+y*y+power((h-L/2*sin(i/180.0*pai)),2),(-1.5))...
            +x*I*p/(2*pai)*power(power((x-L/2*cos(i/180.0*pai)),2.0)+y*y+power((h+L/2*sin(i/180.0*pai)),2),(-1.5)) ;
            E(m,n)=s;
             
        end
    end
    x=-800:10:800;
    y=-800:10:800;
%     figure
    subplot(4,2,(i/30+1));
    contour(x,y,E',100);
    title(i)
    colormap bone 
    xlabel('x')
    ylabel('y')
    colorbar
    end
  figure   
   for i=0:30:180 
      for x=-800:10:800
        for y=-800:10:800
            m=(x+810)/10;
            n=(y+810)/10;
           
             ss=I*p/(2*pai)/power(power((x+L/2*cos(i/180.0*pai)),2)+y*y+power((h-L/2*sin(i/180.0*pai)),2),(0.5))...
			 -I*p/(2*pai)/power(power((x-L/2*cos(i/180.0*pai)),2)+y*y+power((h+L/2*sin(i/180.0*pai)),2),(0.5)) ;
            U(m,n)=ss;
        end
    end
    x=-800:10:800;
    y=-800:10:800;
%     figure
    subplot(4,2,(i/30+1));
    contour(x,y,U',100);
    colormap bone 
    title(i)
    xlabel('x')
    ylabel('y')
    colorbar
   end 
   figure
for i=0:30:180
for x=-800:10:800
     m=(x+810)/10;
 PU(m)=I*p/(2*pai)*L*(x*cos(i/180.0*pai)-h*sin(i/180.0*pai))/(power((h*h+x*x),1.5));   
end
% figure
subplot(4,2,(i/30+1));
x=-800:10:800;
plot(x,PU,'k');
title(i)
xlabel('x')
ylabel('U')
end
figure
 for i=0:30:180
for x=-800:10:800
     m=(x+810)/10;
 PE(m)=-I*p/(2*pai)*L*((h*h-2*x*x)*cos(i/180.0*pai)+3*h*x*sin(i/180.0*pai))/(power((h*h+x*x),2.5));  
end
% figure
subplot(4,2,(i/30+1));
x=-800:10:800;
plot(x,PE,'k');
title(i)
xlabel('x')
ylabel('E')

end   
